package com.tsh.xml.entity;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * xml内容拆分为树节点
 * @author Administrator
 *
 */
public class Element {
	//父节点
	private Element parentElement;
	//子节点队列
	private List<Element> childs;
	//属性集合
	private Map<String,String> attributes; 
	//节点名称
	private String name; 
	//节点值
	private String text; 
	//叶子节点
	private boolean leafed;
	public Element() {
		this.childs = new ArrayList<Element>();
		this.attributes = new ConcurrentHashMap<String, String>();
	}
	
	public Map<String, String> getAttributes() {
		return attributes;
	}
	public void setAttributes(Map<String, String> attributes) {
		this.attributes = attributes;
	}
	public Element getParentElement() {
		return parentElement;
	}
	public void setParentElement(Element parentElement) {
		this.parentElement = parentElement;
	}
	public List<Element> getChilds() {
		return childs;
	}
	public void setChilds(List<Element> childs) {
		this.childs = childs;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}

	public boolean isLeafed() {
		return leafed;
	}

	public void setLeafed(boolean leafed) {
		this.leafed = leafed;
	}
	
}
